package Bill.app.client;

import java.awt.*;
import javax.swing.*;

public class LabelListCellRendererM extends DefaultListCellRenderer
{

    public LabelListCellRendererM()
    {
    }

    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean hasFocus)
    {
        if(JLabel.class.isInstance(value))
        {
            JLabel label = (JLabel)value;
            if(isSelected)
            {
                label.setBackground(new Color(220, 225, 123));
                label.setFont(new Font("Serif", 1, 25));
                label.setForeground(Color.pink);
            } else
            {
                label.setFont(new Font("Serif", 1, 15));
            }
            return label;
        } else
        {
            return super.getListCellRendererComponent(list, value, index, isSelected, hasFocus);
        }
    }

    private static final long serialVersionUID = 1L;
}
